﻿using OrderTrace.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Repositories.Dapper;
using Volo.Abp.EntityFrameworkCore;
using Dapper;
namespace OrderTrace
{
    public class Tpopf001DapperRepository: DapperRepository<OrderTraceDbContext>, ITpopf001DapperRepository, ITransientDependency
    {
        public Tpopf001DapperRepository(IDbContextProvider<OrderTraceDbContext> dbContextProvider)
       : base(dbContextProvider)
        {
        } 


        public async Task<int> UpdateOrderStatus(string orderNo,string status)
        {
          return await  this.DbConnection.ExecuteAsync("Update Tpopf001  SET ORDER_STATUS=@status WHERE ORDER_NO=@orderNo", new { orderNo = orderNo, status = status }, DbTransaction);
        }


    }
}
